package com.zhuss.core.diss;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.core.diss.DetailDissBo;
import com.zhuss.bean.bo.core.diss.SearchDissBo;
import com.zhuss.common.ReadService;
import com.zhuss.core.processor.DissRead;
import com.zhuss.exception.DzcxException;

/**
 * @description: 吐槽查询Service
 * @author: zhushanshuo
 * @create: Tue Feb 02 15:22:08 CST 2021
 **/
@Component("dissReadService")
public class DissReadService implements ReadService<Object, Object> {
	
	@Autowired
	@Qualifier("dissRead")
	private DissRead dissRead;
	
	/**
	 * 详情
	 */
	@Override
	public Object detail(Object param) throws DzcxException {
		DetailDissBo bo = (DetailDissBo) param;
		Long dissId = bo.getDissId();
		Object vo = dissRead.detail(dissId);
		return vo;
	}
	
	/**
	 * 列表
	 */
	@Override
	public Object list(Object param) {
		SearchDissBo bo = (SearchDissBo) param;
		Object result = dissRead.list(bo);
		return result;
	}
	
}

